package easyjava.qixi.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

@Table(name="user_password")
@Entity
public class UserPassword {
	 @Id
	 @Column(name="user_id")
	 private int id;
	 @Column(name="password")
     private String password;
	 @OneToOne
	 @PrimaryKeyJoinColumn
	 private User pUser;
	 
	 
	public User getpUser() {
		return pUser;
	}
	public void setpUser(User pUser) {
		this.pUser = pUser;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	@Override
	public String toString() {
		return "UserPassword [id=" + id + ", password=" + password + "]";
	}
	 
}
